package com.xxwu.trans.controller;

import com.xxwu.trans.model.UserInfo;
import com.xxwu.trans.service.UserInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
@Slf4j
@RestController
public class UserInfoController {
    @Autowired
    private UserInfoService userInfoService;

    @RequestMapping("/insert")
    public String insert(UserInfo userInfo) {
        Integer result = userInfoService.insert(userInfo);
        return "添加成功" + result;
    }


}
